home *** CD-ROM | disk | FTP | other *** search
/ World of Video / World of Video.iso / gfxprograms / 3dprograms / rayshade-4.0 / unapplied / ray2hf < prev    next >
Internet Message Format  |  1995-02-13  |  7KB

  1. From theseas!Princeton.EDU!cek Fri, 15 Jul 94 07:49:29 EET
  2. Received: by kriton.UUCP (V1.17-beta/Amiga)
  3.       id <03r0@kriton.UUCP>; Fri, 15 Jul 94 07:49:29 EET
  4. Received: by theseas.ntua.gr with UUCP; Thu, 14 Jul 1994 22:30:53 +0300
  5. Received: from nemesis.ics.forth.gr (nemesis.csi.forth.gr) by pythia.ics.forth.gr via FORTHnet with SMTP;
  6.     id AA18445 (5.65c/FORTH-ICS-3.0-MHS-7.0); Thu, 14 Jul 1994 21:53:27 +0300
  7. Received: from eunet.EU.net by nemesis.ics.forth.gr via FORTHnet with SMTP;
  8.     id AA26728 (5.65c/ICS-1.1); Thu, 14 Jul 1994 21:44:56 +0300 (EET DST)
  9. Received: (uunet@localhost) by eunet.EU.net (8.6.8/8.6.4) with UUCP id UAA24408 for ariadne!theseas!kriton!kyrimis; Thu, 14 Jul 1994 20:49:02 +0200
  10. Received: from Princeton.EDU by relay1.UU.NET with SMTP 
  11.     (relay) id QQwynz05646; Thu, 14 Jul 1994 14:45:02 -0400
  12. Received: from fs.Princeton.EDU by Princeton.EDU (5.65b/2.111/princeton)
  13.     id AA15127; Thu, 14 Jul 94 14:44:06 -0400
  14. Received: by cs.Princeton.EDU (4.1/1.105)
  15.     id AA17019; Thu, 14 Jul 94 14:44:05 EDT
  16. Received: from netmail.austin.ibm.com by cs.Princeton.EDU (4.1/1.105)
  17.     id AA16964; Thu, 14 Jul 94 14:43:45 EDT
  18. Received: from doorstop.austin.ibm.com by netmail.austin.ibm.com (AIX 3.1/UCB 5.61/gw.0.7)
  19.     for rayshade-users@cs.princeton.edu at cs.princeton.edu
  20.     id AA40595; Thu, 14 Jul 94 13:43:43 -0500
  21. Received: by doorstop.austin.ibm.com (AIX 3.2/UCB 5.64/4.03-client-2.4)
  22.           for rayshade-users@cs.princeton.edu at austin.ibm.com; id AA25818; Thu, 14 Jul 1994 13:43:33 -0500
  23. Organization: Institute of Computer Science, 
  24.     Foundation for Research and Technology-Hellas (FORTH)
  25.     P.O.Box 1385,
  26.     GR 711 10 Heraklion, Crete, Greece        
  27.     tel.: +30 (81) 39 16 00,  fax: +30 (81) 39 16 01
  28. Message-Id: <9407141843.AA25818@doorstop.austin.ibm.com>
  29. Date: Thu, 14 Jul 1994 13:43:32 -0500 (CDT)
  30. In-Reply-To: <199407141548.AA242100909@dizzy.ece.ucdavis.edu> from "Wes Hardaker" at Jul 14, 94 08:48:29 am
  31. X-Mailer: ELM [version 2.4 PL22]
  32. Mime-Version: 1.0
  33. Content-Type: text/plain; charset=US-ASCII
  34. Content-Transfer-Encoding: 7bit
  35. Content-Length: 4113
  36. Errors-To: rayshade-users-request@cs.Princeton.EDU
  37. Remailed-Date: Thu Jul 14 14:43:53 EDT 1994
  38. From: tif@austin.ibm.com (Paul Chamberlain)
  39. To: hardaker@ece.ucdavis.edu, rayshade-users@cs.Princeton.EDU
  40. Subject: Re: rayshade -> heightfield?
  41.  
  42. Wes Hardaker writes:
  43. >Has anyone made any patches that will allow rayshade to output a
  44. >height field rather than a image?  (IE, closer points in white,
  45. >farther in black).
  46.  
  47. I made a hack to do this.  I was going to do random dot stereograms
  48. with the output.  Never got around to the stereograms but my ray2hf
  49. seemed to kind-o-sort-of work.
  50.  
  51. I've attached my diffs.
  52.  
  53. WARNING: this is a hack.
  54. WARNING: it's also a hand pieced together set of diffs
  55. --
  56. Paul Chamberlain  |  <I do NOT speak for IBM!>    | UNIX: tif@austin.ibm.com
  57. IBM AWS, I/O Dev  |  512/838-3759, IBM T/L 678    | IBM-VNET:  TIF AT AUSTIN
  58.  
  59.  
  60. *** src/libshade/Makefile    Wed Aug 26 13:26:39 1992
  61. --- ray2hf/libshade/Makefile    Tue Aug 17 14:29:32 1993
  62. ***************
  63. *** 25,31 ****
  64.   INCLUDE = -I.. -I$(LIBRAYDIR)
  65.   YFLAGS = -d
  66.   
  67. ! CFLAGS = $(CCFLAGS) $(URTINC) $(INCLUDE) $(OPTIMIZE)
  68.   SHELL = /bin/sh
  69.   
  70.   LIB = libshade.a
  71. --- 25,31 ----
  72.   INCLUDE = -I.. -I$(LIBRAYDIR)
  73.   YFLAGS = -d
  74.   
  75. ! CFLAGS = $(CCFLAGS) $(URTINC) $(INCLUDE) $(OPTIMIZE) -DRAY2HF
  76.   SHELL = /bin/sh
  77.   
  78.   LIB = libshade.a
  79.  
  80.  
  81.  
  82. *** src/libshade/picture.c    Tue Aug 17 11:47:38 1993
  83. --- ray2hf/libshade/picture.c    Tue Aug 17 11:53:01 1993
  84. ***************
  85. *** 289,295 ****
  86.       } else
  87.           Options.pictfile = stdout;
  88.   
  89. !     fprintf(Options.pictfile,"%d %d\n",Screen.xsize, Screen.ysize);
  90.   
  91.       (void)fflush(Options.pictfile);
  92.   }
  93. --- 289,295 ----
  94.       } else
  95.           Options.pictfile = stdout;
  96.   
  97. !     fprintf(Options.pictfile,"P5\n%d %d\n255\n",Screen.xsize, Screen.ysize);
  98.   
  99.       (void)fflush(Options.pictfile);
  100.   }
  101. ***************
  102. *** 301,309 ****
  103.       register int i;
  104.   
  105.       for (i = 0; i < Screen.xsize; i++) {
  106. !         (void)fputc((int)CORRECT(buf[i].r), Options.pictfile);
  107. !         (void)fputc((int)CORRECT(buf[i].g), Options.pictfile);
  108. !         (void)fputc((int)CORRECT(buf[i].b), Options.pictfile);
  109.       }
  110.       (void)fflush(Options.pictfile);
  111.   }
  112. --- 301,308 ----
  113.       register int i;
  114.   
  115.       for (i = 0; i < Screen.xsize; i++) {
  116. !         fprintf(stderr,"alpha=%f\n",buf[i].alpha);
  117. !         (void)fputc((int)(buf[i].alpha), Options.pictfile);
  118.       }
  119.       (void)fflush(Options.pictfile);
  120.   }
  121.  
  122.  
  123. *** src/libshade/viewing.c    Wed Aug 26 13:26:39 1992
  124. --- ray2hf/libshade/viewing.c    Tue Aug 17 14:22:01 1993
  125. ***************
  126. *** 239,245 ****
  127. --- 239,247 ----
  128.       color->r *= Sampling.filter[u][v];
  129.       color->g *= Sampling.filter[u][v];
  130.       color->b *= Sampling.filter[u][v];
  131. + #ifndef RAY2HF
  132.       color->alpha *= Sampling.filter[u][v];
  133. + #endif
  134.   }    
  135.   
  136.   void
  137. ***************
  138. *** 281,286 ****
  139. --- 283,289 ----
  140.       dist = FAR_AWAY;
  141.       hitlist.nodes = 0;
  142.       (void)TraceRay(ray, &hitlist, EPSILON, &dist);
  143. + #ifndef RAY2HF
  144.       ShadeRay(&hitlist, ray, dist, &Screen.background, &ctmp, &fullintens);
  145.       color->r = ctmp.r;
  146.       color->g = ctmp.g;
  147. ***************
  148. *** 287,292 ****
  149. --- 290,299 ----
  150.       color->b = ctmp.b;
  151.       if (hitlist.nodes != 0) {
  152.           color->alpha = 1.;
  153. + #else
  154. +     if (hitlist.nodes != 0) {
  155. +         color->alpha = dist;
  156. + #endif
  157.       } else {
  158.           color->alpha = 0.;
  159.       }
  160.  
  161.  
  162. *** src/rayshade/Makefile    Wed Aug 26 13:26:45 1992
  163. --- ray2hf/rayshade/Makefile    Tue Aug 17 14:29:44 1993
  164. ***************
  165. *** 32,38 ****
  166.   # If you are running on a Multimax, add -DMULTIMAX -DSHAREDMEM
  167.   # 
  168.   
  169. ! CFLAGS = $(CCFLAGS) $(INCLUDE) $(OPTIMIZE)
  170.   
  171.   #
  172.   # C-Linda flags, if appropriate
  173. --- 32,38 ----
  174.   # If you are running on a Multimax, add -DMULTIMAX -DSHAREDMEM
  175.   # 
  176.   
  177. ! CFLAGS = $(CCFLAGS) $(INCLUDE) $(OPTIMIZE) -DRAY2HF
  178.   
  179.   #
  180.   # C-Linda flags, if appropriate
  181.  
  182.  
  183.  
  184. *** src/rayshade/raytrace.c    Wed Aug 26 13:26:45 1992
  185. --- ray2hf/rayshade/raytrace.c    Tue Aug 17 14:27:19 1993
  186. ***************
  187. *** 262,268 ****
  188. --- 262,270 ----
  189.           pix->r *= Sampling.filter[x][y];
  190.           pix->g *= Sampling.filter[x][y];
  191.           pix->b *= Sampling.filter[x][y];
  192. + #ifndef RAY2HF
  193.           pix->alpha *= Sampling.filter[x][y];
  194. + #endif
  195.       }
  196.   
  197.       sampnum = 0;
  198. ***************
  199. *** 287,293 ****
  200. --- 289,297 ----
  201.                   pix->r += ctmp.r*Sampling.filter[x][y];
  202.                   pix->g += ctmp.g*Sampling.filter[x][y];
  203.                   pix->b += ctmp.b*Sampling.filter[x][y];
  204. + #ifndef RAY2HF
  205.                   pix->alpha += ctmp.alpha*Sampling.filter[x][y];
  206. + #endif
  207.               }
  208.               if (++sampnum == Sampling.totsamples)
  209.                   sampnum = 0;
  210.  
  211. ----------
  212. Administrivia: rayshade-users-request@cs.princeton.edu
  213. Mailing list: rayshade-users@cs.princeton.edu
  214.  
  215.